<template>
	<view class="container">
		<view class="use_item">
			<view class="title">
				公司名称
			</view>
			<input v-model="form.name" placeholder="请输入公司名称" placeholder-style="color:#CCCCCC;font-size:32rpx" />
			<image src="../../static/img/myCenter/arrowright.png" mode=""></image>
		</view>
		
		<blank></blank>
		<view class="car_require">
			<view class="tip">
				公司简介
			</view>
			<textarea v-model="form.desc" placeholder-style="color:#BBBBBB" placeholder="请输入公司简要情况" maxlength="500"/>
		</view>
		<view class="car_require">
			<view class="tip">
				公司优势
			</view>
			<textarea v-model="form.advantage" placeholder-style="color:#BBBBBB" placeholder="请输入公司的优势" maxlength="500"/>
		</view>
		<view class="car_require">
			<view class="tip">
				服务亮点
			</view>
			<textarea v-model="form.service" placeholder-style="color:#BBBBBB" placeholder="请输入公司的服务亮点" maxlength="500"/>
		</view>
		
		<HandleBtn btnName="确认上传" @click.native="companyUpload()" class="confirm_btn"></HandleBtn>

	</view>
</template>

<script>
	import Blank from "../../components/blank.vue"
	import HandleBtn from "../../components/handleBtn.vue"
	export default {
		components: {
			Blank,
			HandleBtn,
		},
		data() {
			return {		                  				                  				              		
				form:{
					name:"",
					desc:"",
					advantage:"",
					service:"",
				}
			}
		},
		onLoad(option) {
			
		},
		mounted() {
			
		},
		methods: {
			
			// 发布
			companyUpload(){
				this.$utils.requert({url:'companyUpload',data:this.form,type:'post'}).then(res=>{
					if(res.code === 1 ){
						this.$utils.showLayer(res.message)
						uni.switchTab({
							url:"/pages/myCenter/myCenter"
						})
					}else{    
						this.$utils.showLayer(res.message)
					}
				})
			},
		}
	}
</script>
<style>
	page {
		width: 100%;
		height: 100%;
		background-color: #fff;
	}
</style>

<style scoped>
	.container {
		width: 100%;
		height: 100%;
	}

	.use_item {
		padding: 38rpx 0;
		margin:0 24rpx;
		box-sizing: border-box;
		border-bottom: 1rpx solid #f6f6f6;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.use_item:nth-child(2){
		border-bottom: none;
	}
	.use_item:nth-child(7){
		border-bottom: none;
	}

	.use_item .title {
		font-size: 32rpx;
		color: #868686;
		width: 50%;
	}

	.use_item input {
		font-size: 32rpx;
		margin-right: 20rpx;
	}
	.use_item .picker{
		font-size: 32rpx;
		margin-left: 40rpx;
	}	
	.use_item image{
		width: 14rpx;
		height: 24rpx;
	}
	.tip{
		font-size: 32rpx;
		color: #333333;
		margin-bottom: 34rpx;
	}
	textarea{
		background-color: #f5f4f6;
		font-size: 28rpx;
		width: 100%;
		border-radius: 7rpx;
		padding:32rpx 24rpx;
		box-sizing: border-box;
	}
	.car_require {
		padding: 20rpx 24rpx;
		box-sizing: border-box;
	}
	.car_image{
		padding:0 24rpx 50rpx;
		box-sizing: border-box;
	}
	.car_image .tip{
		display: flex;
	}
	.car_image .tip .no_require{
		font-size: 28rpx;
		color: #BBBBBB;
	}
	.car_image .package_img{
		width:200rpx;
		height: 200rpx;
		background-color: #f5f4f6;
		text-align: center;
		margin-left: 20rpx;
	}
	.car_image .package_img image{
		width:79rpx;
		height: 76rpx;
		margin-top: 62rpx

	}
	.confirm_btn{
		margin-top: 70rpx;
		margin-bottom: 70rpx;
	}
	.button{
		font-size: 28rpx;
		margin: 0;
		margin-left: auto;
		background-color: #fff;
		color: #7a7a7a;
	}
	.button::after{
		height: 100%;
		border: none;
	}
</style>
